<?php
defined("_VALID_ACCESS") || die('Direct access forbidden');
    class Eyeworx_Inventory_FramesImport_RBO_RBOFramesImport extends RBO_Recordset {

//        public function display_total($record, $nolink = false){
//            $total = $record['total'] = $record['quantity'] * $record['price'];
//            $price_currency =  Utils_CurrencyFieldCommon::get_values($record->total);
//            return Utils_CurrencyFieldCommon::format(round($total,2),$price_currency[1]);
//        }

        public function fields() {
            $fields = array();

            $acc = new RBO_Field_Select('Frame', 'eyeworx_frames', array('frame_model', 'frame_brand'));
            $acc->set_visible()->set_required();
            $fields[] = $acc;

            $date = new RBO_Field_Date('Date Imported');
            $date->set_required()->set_visible();
            $fields[] = $date;

            $quantity = new RBO_Field_Integer('Quantity');
            $quantity->set_required()->set_visible();
            $fields[] = $quantity;

            return $fields;

        }

        public function table_name() {
            return 'eyeworx_frames_import';
        }

    }
?>